/*
 *  Cero Project - Copyright   2006 The Cero Developement Team 
 *  (Michael Laguerre, Camille Roux, Matthieu Segret, Mathieu Sivade) 
 * 
 *  This program is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU General Public License as published by the Free 
 *  Software Foundation; either version 2 of the License, or (at your option) 
 *  any later version.
 * 
 *  This program is distributed in the hope that it will be useful, but 
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 *  for more details.
 */

package org.ceroproject;

import java.util.Collection;
import java.util.List;

/**
 * This interface provides sorting for elements. It is meant to be used to sort
 * out rules or events priority.
 * 
 * @author Telem
 * @param <DataType> The type of data to sort
 */
public interface Sorter<DataType> {

	/**
	 * Sorts the data, according to the Sorter own sorting method.
	 * 
	 * @param data
	 *            The elements to sort
	 * @return a collection containing the element, in which iterating through
	 *         will list the element sorted.
	 */
	List<DataType> sort(Collection<DataType> data);
}
